package com.jsgt.greekfire.bean

import java.io.Serializable

class MenuEntity : Serializable {
    var id: String? = null
    var title: String? = null
    var ico: String? = null
    var sort: String? = null
    var num = "0"
    var select = false
    var childs: List<MenuEntity?>? = null
    var hide = false

    override fun equals(other: Any?): Boolean {
        return if (other == null || other.javaClass != javaClass) {
            false
        } else {
            other as MenuEntity
            id.equals(other.id)
        }
    }

    override fun hashCode(): Int {
        var result = id?.hashCode() ?: 0
        result = 31 * result + (title?.hashCode() ?: 0)
        result = 31 * result + (ico?.hashCode() ?: 0)
        result = 31 * result + (sort?.hashCode() ?: 0)
        result = 31 * result + num.hashCode()
        result = 31 * result + select.hashCode()
        result = 31 * result + (childs?.hashCode() ?: 0)
        result = 31 * result + hide.hashCode()
        return result
    }
}